<!DOCTYPE HTML><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META charset="utf-8">

<LINK REL="STYLESHEET" HREF="../book.css" TYPE="text/css">
<TITLE>Expressions</TITLE>

<link rel="stylesheet" type="text/css" HREF="../book.css">
</HEAD>
<BODY>
<h3>Expressions</h3>
<p>An <b>expression</b> is a snippet of code that can be evaluated to produce a
value. The context for an expression depends on the particular debug
model. Some expressions may need to be evaluated at a specific location in
the program so that its variables can be referenced.
<a href="../reference/api/org/eclipse/debug/core/model/IExpression.html"><b>IExpression</b></a>
defines a general interface for debug expressions.</p>
<p>An expression manager (<a href="../reference/api/org/eclipse/debug/core/IExpressionManager.html"><b>IExpressionManager</b></a>)
keeps track of all of the expressions in the workspace. It will also fire
events to interested listeners as expressions are added, removed, or changed.</p>
<p>Expressions can be used to implement &quot;inspectors,&quot; or &quot;scrapbooks&quot; that let users evaluate
code snippets. The Java tooling uses expressions to implement the
expression generated when the user inspects the source code.</p>
<p>A <b>watch expression</b> is an expression that is repeatedly evaluated as the program executes.
<a href="../reference/api/org/eclipse/debug/core/model/IWatchExpression.html"><b>IWatchExpression</b></a>
defines a specialized kind of <a href="../reference/api/org/eclipse/debug/core/model/IExpression.html"><b>IExpression</b></a>
that updates the value of the expression when supplied with a new debug context.  Watch expressions are used to implement
&quot;watch lists,&quot; which show changes in the value of an expression as the program executes.</p>

</BODY>
</HTML>
